Don't pop up under the cursor.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 20 Jul 2007 12:13:24 +0000 (12:13 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 20 Jul 2007 12:13:24 +0000 (12:13 +0000)
2007-07-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltip.c (gtk_tooltip_position): Don't pop up
        under the cursor.

svn path=/trunk/; revision=18512

ChangeLog
gtk/gtktooltip.c

index bbb360c2a564609bbc5a413741ed7d544cedd006..75c92f426e3cb19d63b2dbc7c879bd07538555d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-20  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktooltip.c (gtk_tooltip_position): Don't pop up
+       under the cursor.  This fixes tooltip-induced flickering 
+       in the tasklist in a bottom panel.
+
 2007-07-20  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkpathbar.c (make_directory_button): Don't leak
index a79617034c5cb610f464733805b2e7a9c26b2e38..d60829df31cdd44e96d32b39a1794bcdf7613771 100644 (file)
@@ -751,7 +751,15 @@ gtk_tooltip_position (GtkTooltip *tooltip,
 
       if (y + requisition.height > monitor.y + monitor.height)
         y -= y - (monitor.y + monitor.height) + requisition.height;
-
+  
+      if (!tooltip->keyboard_mode_enabled)
+        {
+          /* don't pop up under the pointer */
+          if (x <= tooltip->last_x && tooltip->last_x < x + requisition.width &&
+              y <= tooltip->last_y && tooltip->last_y < y + requisition.height)
+            y = tooltip->last_y - requisition.height - 2;
+        }
+  
       gtk_window_move (GTK_WINDOW (tooltip->current_window), x, y);
       gtk_widget_show (GTK_WIDGET (tooltip->current_window));
     }